import os
import asyncio
from dotenv import load_dotenv
from fastmcp import Client

load_dotenv(verbose=True)

base_url = os.getenv("REF_MCP_SERVER_BASE_URL", default="https://example.com/sse?key=")
key = os.getenv("REF_MCP_SERVER_KEY", default="")
ref_mcp_server_url = base_url + key
ref_client = Client(ref_mcp_server_url)

async def ref_ping():
    async with ref_client:
        result = await ref_client.call_tool("ping", {})
        return result

if __name__ == "__main__":
    asyncio.run(ref_ping())
